package com.warm.base.design.s_composite;

/**
 * @Date: 2019/11/27 13:27
 * @Author: LChuang
 * @Description: 一个抽象构件, 声明一个接口用于访问和管理Component 的子部件
 */
public abstract class Component {
    protected String name;

    public Component(String name){
        this.name = name;
    }

    public void add(Component component){
        throw new UnsupportedOperationException("not support");
    }

    public void remove(Component component){
        throw new UnsupportedOperationException("not support");
    }

    public abstract String display();
}
